package com.princess.demok.base.view

import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import com.princess.demok.base.view.MyBaseActivity
import com.kingja.loadsir.core.LoadService
import com.kingja.loadsir.core.LoadSir

/**
 * @author: xha
 * @date: 2021/6/2 15:37
 * @Description:
 */
abstract class BaseMvvmActivity : MyBaseActivity() {
    lateinit var mRootView: View

    val loadService: LoadService<*> by lazy {
        LoadSir.getDefault().register(this) {
            reLoad()
        }
    }

    open fun reLoad() {}

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mRootView = (findViewById<ViewGroup>(android.R.id.content)).getChildAt(0)

    }

}